<template>
	<view class="content">
		<image class="logo" src="/static/logo/logo_ico.png"></image>
		<view class="feedback-form">
			<view class="form-item">
				<text class="label">联系人姓名：</text>
				<input
					v-model="form.name"
					placeholder="请输入您的姓名"
					placeholder-class="placeholder"
					class="input-box"
				/>
			</view>
			<view class="form-item">
				<text class="label">联系方式：</text>
				<input
					v-model="form.contact"
					placeholder="请输入您的联系方式"
					placeholder-class="placeholder"
					class="input-box"
				/>
			</view>
			<view class="form-item">
				<text class="label">反馈内容：</text>
				<textarea
					v-model="form.content"
					placeholder="请输入您的意见或建议"
					placeholder-class="placeholder"
					class="textarea-box"
				/>
			</view>
			<button class="submit-btn" @click="submitFeedback">提交反馈</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					name: '',
					contact: '',
					content: ''
				}
			}
		},
		methods: {
			submitFeedback() {
				if (!this.form.name) {
					uni.showToast({
						title: '请输入联系人姓名',
						icon: 'none'
					});
					return;
				}
				if (!this.form.contact) {
					uni.showToast({
						title: '请输入联系方式',
						icon: 'none'
					});
					return;
				}
				if (!this.form.content) {
					uni.showToast({
						title: '请输入反馈内容',
						icon: 'none'
					});
					return;
				}
				
				console.log('提交反馈：', this.form);
				
				uni.showToast({
					title: '提交成功',
					icon: 'success'
				});
				
				this.form = {
					name: '',
					contact: '',
					content: ''
				};
			}
		}
	}
</script>

<style lang="scss">
	.content {
		padding: 40rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.logo {
		height: 120rpx;
		width: 120rpx;
		margin-bottom: 40rpx;
		border-radius: $uni-border-radius-circle;
		box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
	}

	.feedback-form {
		width: 100%;
		max-width: 600rpx;
		margin: 0 auto;
		background: $uni-bg-color;
		padding: 40rpx;
		border-radius: $uni-border-radius-lg;
		box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.1);
	}

	.form-item {
		margin-bottom: 40rpx;
	}

	.label {
		display: block;
		margin-bottom: 16rpx;
		font-size: 28rpx;
		color: $uni-text-color-grey;
	}

	.input-box, .textarea-box {
		width: 100%;
		padding: 24rpx;
		border: 1rpx solid $uni-border-color;
		border-radius: $uni-border-radius-base;
		box-sizing: border-box;
		background: $uni-bg-color;
		transition: all 0.3s ease;
		font-size: 28rpx;
		color: $uni-text-color;
	}

	.input-box {
		height: 100rpx;
	}

	.textarea-box {
		height: 200rpx;
	}

	.input-box:focus, .textarea-box:focus {
		border-color: $uni-color-primary;
		box-shadow: 0 0 0 3rpx rgba($uni-color-primary, 0.1);
	}

	.placeholder {
		color: $uni-text-color-placeholder;
		font-size: 28rpx;
		line-height: 1.5;
	}

	.submit-btn {
		width: 100%;
		height: 88rpx;
		margin-top: 40rpx;
		background: linear-gradient(135deg, $uni-color-primary, lighten($uni-color-primary, 10%));
		color: $uni-text-color-inverse;
		border-radius: $uni-border-radius-base;
		font-size: 32rpx;
		letter-spacing: 2rpx;
		transition: all 0.3s ease;
		box-shadow: 0 4rpx 12rpx rgba($uni-color-primary, 0.2);
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 1;
	}

	.submit-btn:active {
		transform: scale(0.98);
		box-shadow: 0 2rpx 6rpx rgba($uni-color-primary, 0.2);
	}
</style> 